package top.lingkang.finalgateway.admin.entity;

import lombok.Data;
import top.lingkang.mm.annotation.Column;
import top.lingkang.mm.annotation.Id;
import top.lingkang.mm.annotation.PreUpdate;
import top.lingkang.mm.annotation.Table;
import top.lingkang.mm.constant.IdType;

import java.util.Date;

/**
 * @author lingkang
 * @create by 2024/5/17 14:47
 */
@Data
@Table("t_ip_list_log")
public class IpListLogEntity {
    @Id(IdType.ASSIGN)
    private String id;
    private Integer port;
    private String type;
    private String content;
    @Column("create_time")
    private Date createTime;

    @PreUpdate
    public void preUpdate() {
        if (createTime == null)
            createTime = new Date();
    }
}
